<!DOCTYPE html>
<!--[if lt IE 7 ]><html lang="en" class="ie6 ielt7 ielt8 ielt9"><![endif]--><!--[if IE 7 ]><html lang="en" class="ie7 ielt8 ielt9"><![endif]--><!--[if IE 8 ]><html lang="en" class="ie8 ielt9"><![endif]--><!--[if IE 9 ]><html lang="en" class="ie9"> <![endif]--><!--[if (gt IE 9)|!(IE)]><!-->
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml"><!--<![endif]-->
<head>
    <meta charset="utf-8">
    <title>Dashboard</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="/css/bootstrap1.min.css" rel="stylesheet">
    <link href="/css/bootstrap1-responsive.min.css" rel="stylesheet">
    <link href="/css/site.css" rel="stylesheet">
    <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
<body>
<div class="container">
    <div th:insert="~{Common/ownCommon::topbar(active='oi')}"></div>
    <!-- 这里是头部栏往下 -->
    <div class="row">
        <div th:insert="~{Common/ownCommon::sidebar(active='oi')}"></div>
        <!-- 这里是主体 -->
        <div class="span9">
            <h1>
                KAI房屋租赁系统
            </h1>
            <div class="hero-unit">
                <h1>
                    欢迎回来!
                </h1>
                <p>
                    以下是您的个人房屋信息
                </p>
                <p>
                    <a th:href="@{/ownHelp}" class="btn btn-primary btn-large">快速上手系统</a>
                </p>
            </div>
            <div class="well summary">
                <ul>
                    <li>
                        <span class="count" th:text="${houses.size()}"></span> 共有房屋
                    </li>
                    <li>
                        <span class="count" th:text="${out}"></span> 已出租
                    </li>
                    <li>
                        <span class="count" th:text="${in}"></span> 待出租
                    </li>
                </ul>
            </div>
            <h2>
                我的房屋
            </h2>

            <!-- 这里是表格 -->
            <table class="table table-bordered table-striped">
                <thead>
                <tr>
                    <th>房屋id</th>
                    <th>地址</th>
                    <th>房型</th>
                    <th>可入住人数</th>
                    <th>租金</th>
                    <th>出租状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="hou:${houses}">
                    <td th:text="${hou.get('id')}"></td>
                    <td th:text="${hou.get('address')}"></td>
                    <td th:text="${session.houseType[hou.get('house_type')]}"></td>
                    <td th:text="${hou.get('per_num')}"></td>
                    <td th:text="${hou.get('rent')}"></td>
                    <td th:text="${hou.get('house_status')==1?'已出租':'待出租'}"></td>
                    <td>
                        <a th:href="@{/ownGallery/} + ${hou.get('id')}" class="view-link">查看房屋图片</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/site.js"></script>
</body>
</html>